<div class="container">
    <?php echo validation_errors("<div class='alert alert-danger'>", "</div>"); ?>
    <form class="form-horizontal" method="post">
        
        <div class="control-group">
            <label class="control-label">Fecha</label>
            <div class="controls">
                <div id="datepicker" class="input-append">
                    <input name="fecha" class="input-block-level" data-format="yyyy-MM-dd" type="text">
                    <span class="add-on">
                        <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
                    </span>
                </div>
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label">Proveedor</label>
            <div class="controls">
                <select name="proveedor" class="span6 chosen">
                    <?php foreach($proveedores as $proveedor) { ?>
                    <option value="<?=$proveedor['idProveedor']?>"><?=$proveedor['nombre']?></option>
                    <?php } ?>
                </select>
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label">Moneda</label>
            <div class="controls">
                <select name="moneda" class="chosen">
                    <?php foreach($monedas as $moneda) { ?>
                    <option value="<?=$moneda['idMoneda']?>"><?=$moneda['moneda']?></option>
                    <?php } ?>
                </select>
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label">Observaciones</label>
            <div class="controls">
                <textarea rows="5" name="observaciones"><?=set_value('observaciones')?></textarea>
            </div>
        </div>
        
        <div class="control-group">
            <label class="control-label"></label>
            <div class="controls">
                <button type="submit" class="btn btn-primary">Crear</button>
            </div>
        </div>
        
    </form>
</div>

<script type="text/javascript">
    $(document).ready(function() {
        $(".chosen").chosen();
        $("#datepicker").datetimepicker({
            pickTime: false
        });
    });
</script>